package roborally;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

public class RobotTest {
	
	/**
	 * Set up an immutable test fixture.
	 * TODO: nodig???????
	 * @post   The robot defaultRobot references a new
	 *         robot with position (0,0), energy 0 and orientation 0.
	 */
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		Robot defaultRobot = new Robot(0, 0, 0, 0.0);
	}
	
	private Robot robot33Orient0Energy20000, robot82Orient3Energy8000;

	/**
	 * Set up a mutable test fixture.
	 * 
	 * @post   The variable robot33Orient0Energy20000 references a new
	 *         robot with with position (3,3), energy 20000 and orientation 0.
	 * @post   The variable robot82Orient3Energy8000 references a new
	 *         robot with  position (8,2), energy 8000 and orientation 3.
	 */
	@Before
	public void setUp() throws Exception {
		robot33Orient0Energy20000 = new Robot(3, 3, 0, 20000);
		robot82Orient3Energy8000 = new Robot(8, 2, 3, 8000);
	}

	/**
	 * TODO
	 */
	@Test
	public final void constructor_NegativeCoords() {
		Robot newRobot = new Robot(-25, -10, 2, 400.0);
		assertEquals(25,newRobot.getxCoord());
		assertEquals(10,newRobot.getyCoord());
	}
	
	/**
	 * TODO
	 */
	@Test
	public final void constructor_IllegalOrientation() {
		Robot newRobot = new Robot(25, 10, 5, 400.0);
		assertEquals(1,newRobot.getOrientation());
	}
	
	/**
	 * TODO
	 */
	@Test
	public final void constructor_IllegalEnergy() {
		Robot newRobot = new Robot(25, 10, 5, 5673908);
		assertNotSame(5673908, newRobot.getEnergy());
	}
	
		
	}


